package com.well.rpc.register;

import com.well.rpc.netty.ChannelClientFactory;

import java.net.InetSocketAddress;
import java.net.SocketAddress;


/**
 * Register Client
 */
public class RegisterClient {

    /**
     * @param host host
     * @param port port
     */
    public static void connect(String host, Integer port) {
        InetSocketAddress inetSocketAddress = new InetSocketAddress(host, port);
        connect(inetSocketAddress);
    }

    /**
     * connect socketAddress
     * @param socketAddress socket地址
     */
    public static void connect(SocketAddress socketAddress) {
        ChannelClientFactory.createChannel(socketAddress);
    }
}
